package com.turing.pre.processor.inner;

import com.turing.common.response.ResponseVO;
import com.turing.pre.processor.vo.in.FileImagesVo;
import com.turing.pre.processor.vo.in.FileTaskVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "draw")
public interface FileTaskInnerService {

    @PostMapping("fileTask/fileImageCallBack")
    ResponseVO<String> fileImageCallBack(@RequestBody FileImagesVo fileImagesVo);

    @PostMapping("fileTask/getAndLockPreProcessTask")
    ResponseVO<FileTaskVo> getAndLockPreProcessTask( @RequestParam("domain") String domain );

    @PostMapping("fileTask/analysisCallback")
    ResponseVO<Object> analysisCallback( @RequestParam("parentTaskSn") String parentTaskSn, @RequestParam("taskSn") String taskSn, @RequestParam("jsonUrl") String jsonUrl );

    @PostMapping("fileTask/preprocessorFailedCallback")
    ResponseVO<Object> preprocessorFailedCallback( @RequestParam("taskSn") String taskSn );

    @PostMapping("fileTask/savePdfUrl")
    ResponseVO<Object> savePdfUrl(@RequestParam("pdfUrl")String pdfUrl, @RequestParam("taskSn")String taskSn);


    /**
     * 根据draw_task_sn获取模板id列表
     *
     * @param drawTaskSn 根据draw_task_sn获取模板id列表
     * @return {@link ResponseVO}<{@link Object}>
     */
    @GetMapping("fileTask/getTemplateIdsByDrawTaskSn")
    ResponseVO<Object> getTemplateIdListByDrawTaskSn(String drawTaskSn);
}
